package cn.cqsztech.jenum;

import cn.hutool.core.util.ObjectUtil;

import java.util.Arrays;

/**
 * ccmars
 * 2022/2/15
 **/
public class JavaEnumTester {
    public static void main(String[] args) {
        StaticDCT  s_reason = Arrays.stream(StaticDCT.values()).filter(e -> e.getValue().equals("a")).findFirst().orElse(null);
        if(ObjectUtil.isNotEmpty(s_reason)){
            System.out.println(s_reason.getValue());
        }
        System.out.println(s_reason);
        StaticDCT a = StaticDCT.valueOf("A");
        System.out.println(a.name());
        System.out.println(a.getValue());
        System.out.println(a.toString());
    }
}
